<template>
  <div id="app">
    <my-header></my-header>
    <div class="app-body">
      <img alt="Vue logo" :src="logoUrl" />
      <p>现在时间是: <span class="app-time" v-text="date"></span></p>
      <my-name></my-name>
      <hello-world></hello-world>
    </div>
    <my-footer></my-footer>
  </div>
</template>

<script>
import {HelloWorld, MyHeader, MyName, MyFooter} from 'common'
import {DateUtils} from 'utils'
export default {
  name: 'App',
  components: {
    HelloWorld,
    MyHeader,
    MyName,
    MyFooter
  },
  data () {
    return {
      date: ``,
      logoUrl: `${process.env.VUE_APP_COMMON_URL}/public/images/common/logo.png`
    }
  },
  mounted() {
    this.date = DateUtils.getNowDate()
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.app-body {
  height: calc(100vh - 180px);
  box-sizing: border-box;
}
.app-time {
  color: darkgoldenrod;
}
</style>
